var _, S, A = {
    exports: {}
}, j = {
    exports: {}
};

S = {
    rotl: function (e, t) {
        return e << t | e >>> 32 - t
    },
    rotr: function (e, t) {
        return e << 32 - t | e >>> t
    },
    endian: function (e) {
        if (e.constructor == Number)
            return 16711935 & S.rotl(e, 8) | 4278255360 & S.rotl(e, 24);
        for (var t = 0; t < e.length; t++)
            e[t] = S.endian(e[t]);
        return e
    },
    randomBytes: function (e) {
        for (var t = []; e > 0; e--)
            t.push(Math.floor(256 * Math.random()));
        return t
    },
    bytesToWords: function (e) {
        for (var t = [], r = 0, n = 0; r < e.length; r++,
            n += 8)
            t[n >>> 5] |= e[r] << 24 - n % 32;
        return t
    },
    wordsToBytes: function (e) {
        for (var t = [], r = 0; r < 32 * e.length; r += 8)
            t.push(e[r >>> 5] >>> 24 - r % 32 & 255);
        return t
    },
    bytesToHex: function (e) {
        for (var t = [], r = 0; r < e.length; r++)
            t.push((e[r] >>> 4).toString(16)),
                t.push((15 & e[r]).toString(16));
        return t.join("")
    },
    hexToBytes: function (e) {
        for (var t = [], r = 0; r < e.length; r += 2)
            t.push(parseInt(e.substr(r, 2), 16));
        return t
    },
    bytesToBase64: function (e) {
        for (var t = [], r = 0; r < e.length; r += 3)
            for (var n = e[r] << 16 | e[r + 1] << 8 | e[r + 2], o = 0; o < 4; o++)
                8 * r + 6 * o <= 8 * e.length ? t.push(_.charAt(n >>> 6 * (3 - o) & 63)) : t.push("=");
        return t.join("")
    },
    base64ToBytes: function (e) {
        e = e.replace(/[^A-Z0-9+\/]/gi, "");
        for (var t = [], r = 0, n = 0; r < e.length; n = ++r % 4)
            0 != n && t.push((_.indexOf(e.charAt(r - 1)) & Math.pow(2, -2 * n + 8) - 1) << 2 * n | _.indexOf(e.charAt(r)) >>> 6 - 2 * n);
        return t
    }
},
    j.exports = S;
var C = j.exports,
    R = {
        utf8: {
            stringToBytes: function (e) {
                return R.bin.stringToBytes(unescape(encodeURIComponent(e)))
            },
            bytesToString: function (e) {
                return decodeURIComponent(escape(R.bin.bytesToString(e)))
            }
        },
        bin: {
            stringToBytes: function (e) {
                for (var t = [], r = 0; r < e.length; r++)
                    t.push(255 & e.charCodeAt(r));
                return t
            },
            bytesToString: function (e) {
                for (var t = [], r = 0; r < e.length; r++)
                    t.push(String.fromCharCode(e[r]));
                return t.join("")
            }
        }
    }
    , P = R
    , q = function (e) {
        return null != e && (L(e) || function (e) {
            return "function" == typeof e.readFloatLE && "function" == typeof e.slice && L(e.slice(0, 0))
        }(e) || !!e._isBuffer)
    };

function L(e) {
    return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
}

o = function o(i, a) {
    var e = C
        , t = P.utf8
        , r = q
        , n = P.bin
    i.constructor == String ? i = a && "binary" === a.encoding ? n.stringToBytes(i) : t.stringToBytes(i) : r(i) ? i = Array.prototype.slice.call(i, 0) : Array.isArray(i) || i.constructor === Uint8Array || (i = i.toString());
    for (var u = e.bytesToWords(i), s = 8 * i.length, c = 1732584193, l = -271733879, f = -1732584194, p = 271733878, d = 0; d < u.length; d++)
        u[d] = 16711935 & (u[d] << 8 | u[d] >>> 24) | 4278255360 & (u[d] << 24 | u[d] >>> 8);
    u[s >>> 5] |= 128 << s % 32,
        u[14 + (s + 64 >>> 9 << 4)] = s;
    var h = o._ff
        , y = o._gg
        , v = o._hh
        , b = o._ii;
    for (d = 0; d < u.length; d += 16) {
        var m = c
            , w = l
            , g = f
            , x = p;
        c = h(c, l, f, p, u[d + 0], 7, -680876936),
            p = h(p, c, l, f, u[d + 1], 12, -389564586),
            f = h(f, p, c, l, u[d + 2], 17, 606105819),
            l = h(l, f, p, c, u[d + 3], 22, -1044525330),
            c = h(c, l, f, p, u[d + 4], 7, -176418897),
            p = h(p, c, l, f, u[d + 5], 12, 1200080426),
            f = h(f, p, c, l, u[d + 6], 17, -1473231341),
            l = h(l, f, p, c, u[d + 7], 22, -45705983),
            c = h(c, l, f, p, u[d + 8], 7, 1770035416),
            p = h(p, c, l, f, u[d + 9], 12, -1958414417),
            f = h(f, p, c, l, u[d + 10], 17, -42063),
            l = h(l, f, p, c, u[d + 11], 22, -1990404162),
            c = h(c, l, f, p, u[d + 12], 7, 1804603682),
            p = h(p, c, l, f, u[d + 13], 12, -40341101),
            f = h(f, p, c, l, u[d + 14], 17, -1502002290),
            c = y(c, l = h(l, f, p, c, u[d + 15], 22, 1236535329), f, p, u[d + 1], 5, -165796510),
            p = y(p, c, l, f, u[d + 6], 9, -1069501632),
            f = y(f, p, c, l, u[d + 11], 14, 643717713),
            l = y(l, f, p, c, u[d + 0], 20, -373897302),
            c = y(c, l, f, p, u[d + 5], 5, -701558691),
            p = y(p, c, l, f, u[d + 10], 9, 38016083),
            f = y(f, p, c, l, u[d + 15], 14, -660478335),
            l = y(l, f, p, c, u[d + 4], 20, -405537848),
            c = y(c, l, f, p, u[d + 9], 5, 568446438),
            p = y(p, c, l, f, u[d + 14], 9, -1019803690),
            f = y(f, p, c, l, u[d + 3], 14, -187363961),
            l = y(l, f, p, c, u[d + 8], 20, 1163531501),
            c = y(c, l, f, p, u[d + 13], 5, -1444681467),
            p = y(p, c, l, f, u[d + 2], 9, -51403784),
            f = y(f, p, c, l, u[d + 7], 14, 1735328473),
            c = v(c, l = y(l, f, p, c, u[d + 12], 20, -1926607734), f, p, u[d + 5], 4, -378558),
            p = v(p, c, l, f, u[d + 8], 11, -2022574463),
            f = v(f, p, c, l, u[d + 11], 16, 1839030562),
            l = v(l, f, p, c, u[d + 14], 23, -35309556),
            c = v(c, l, f, p, u[d + 1], 4, -1530992060),
            p = v(p, c, l, f, u[d + 4], 11, 1272893353),
            f = v(f, p, c, l, u[d + 7], 16, -155497632),
            l = v(l, f, p, c, u[d + 10], 23, -1094730640),
            c = v(c, l, f, p, u[d + 13], 4, 681279174),
            p = v(p, c, l, f, u[d + 0], 11, -358537222),
            f = v(f, p, c, l, u[d + 3], 16, -722521979),
            l = v(l, f, p, c, u[d + 6], 23, 76029189),
            c = v(c, l, f, p, u[d + 9], 4, -640364487),
            p = v(p, c, l, f, u[d + 12], 11, -421815835),
            f = v(f, p, c, l, u[d + 15], 16, 530742520),
            c = b(c, l = v(l, f, p, c, u[d + 2], 23, -995338651), f, p, u[d + 0], 6, -198630844),
            p = b(p, c, l, f, u[d + 7], 10, 1126891415),
            f = b(f, p, c, l, u[d + 14], 15, -1416354905),
            l = b(l, f, p, c, u[d + 5], 21, -57434055),
            c = b(c, l, f, p, u[d + 12], 6, 1700485571),
            p = b(p, c, l, f, u[d + 3], 10, -1894986606),
            f = b(f, p, c, l, u[d + 10], 15, -1051523),
            l = b(l, f, p, c, u[d + 1], 21, -2054922799),
            c = b(c, l, f, p, u[d + 8], 6, 1873313359),
            p = b(p, c, l, f, u[d + 15], 10, -30611744),
            f = b(f, p, c, l, u[d + 6], 15, -1560198380),
            l = b(l, f, p, c, u[d + 13], 21, 1309151649),
            c = b(c, l, f, p, u[d + 4], 6, -145523070),
            p = b(p, c, l, f, u[d + 11], 10, -1120210379),
            f = b(f, p, c, l, u[d + 2], 15, 718787259),
            l = b(l, f, p, c, u[d + 9], 21, -343485551),
            c = c + m >>> 0,
            l = l + w >>> 0,
            f = f + g >>> 0,
            p = p + x >>> 0
    }
    return e.endian([c, l, f, p])
}
o._ff = function (e, t, r, n, o, i, a) {
    var u = e + (t & r | ~t & n) + (o >>> 0) + a;
    return (u << i | u >>> 32 - i) + t
}
o._gg = function (e, t, r, n, o, i, a) {
    var u = e + (t & n | r & ~n) + (o >>> 0) + a;
    return (u << i | u >>> 32 - i) + t
}
o._hh = function (e, t, r, n, o, i, a) {
    var u = e + (t ^ r ^ n) + (o >>> 0) + a;
    return (u << i | u >>> 32 - i) + t
}
o._ii = function (e, t, r, n, o, i, a) {
    var u = e + (r ^ (t | ~n)) + (o >>> 0) + a;
    return (u << i | u >>> 32 - i) + t
}
o._blocksize = 16
o._digestsize = 16

function I(t, r) {
    if (null == t)
        throw new Error("Illegal argument " + t);
    var i = C.wordsToBytes(o(t, r));
    return r && r.asBytes ? i : r && r.asString ? n.bytesToString(i) : C.bytesToHex(i)
}


function get_w_rid(e) {
    var o = {
        "imgKey": "7cd084941338484aae1ad9425b84077c",
        "subKey": "4932caff0ff746eab6f01bf08b70ac45"
    }
    i = o.imgKey, a = o.subKey;
    for (var u = (r = i + a,
        n = [],
        [46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11, 36, 20, 34, 44, 52].forEach((function (e) {
                r.charAt(e) && n.push(r.charAt(e))
            }
        )),
        n.join("").slice(0, 32)), s = Math.round(Date.now() / 1e3), c = Object.assign({}, e, {
        wts: s
    }), l = Object.keys(c).sort(), f = [], p = /[!'()*]/g, d = 0; d < l.length; d++) {
        var h = l[d]
            , y = c[h];
        y && "string" == typeof y && (y = y.replace(p, "")),
        null != y && f.push("".concat(encodeURIComponent(h), "=").concat(encodeURIComponent(y)))
    }
    var v = f.join("&");


    return {
        w_rid: I(v + u),
        wts: s.toString()
    }
}

// param = {
//     "oid": "1506185539",
//     "type": 1,
//     "mode": 3,
//     "pagination_str": "{\"offset\":\"\"}",
//     "plat": 1,
//     "seek_rpid": "",
//     "web_location": 1315875
// }
// console.log(get_w_rid(param))